﻿<%@ Page Title="最新评论" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" AutoEventWireup="true" CodeBehind="LastComments.aspx.cs" Inherits="RegexLib.Web.Views.Regex.LastComments" %>
<asp:Content ID="Content" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
<div class="box">
	<div class="bt">最新评论</div>
	<div class="bc">
<% var lastComments = (LastComment[])ViewData["LastComments"]; %>
<% for (int i = 0; i < lastComments.Length; i++) %>
<% { %>
	<% var c = lastComments[i]; %>
	<p class="sm-des">[<%= c.AddedTime.ToString("yyyy-MM-dd HH:mm:ss") %>]
	<a href="<%= RxUrl.GetUserUrl(c.UserAccessKey) %>"><%= HttpUtility.HtmlEncode(c.UserNickname.LimitLength(30)) %></a></p>
	<p class="sm-des"><%= HttpUtility.HtmlEncode(c.CommentBody.LimitLength(200)) %></p>
	<p class="sm-des"><a href="<%= RxUrl.GetViewRegexUrl(c.RegexAccessKey) %>"><%= HttpUtility.HtmlEncode(c.RegexTitle.LimitLength(80)) %></a></p>
	<hr />
	
	<% if (i == 10 || i == 20) %>
	<% { %>
		<div class="ad-c"><%= RxAdsUtility.GetAdsCode("inpage") %></div>
		<hr />
	<% } %>
<% } %>
	</div>
</div>
</asp:Content>
